<template>
  <div>
    <Dialog class="two-columns" title="入库详情" :loading="loading" :visible="visible" :reveal="false" @close="handleClose">
      <el-row>
        <el-col :span="12">入库单号：{{ currentRow.dataCode }}</el-col>
        <el-col :span="12">仓库：{{ currentRow.warehouseName }}</el-col>
        <el-col :span="12">操作员：{{ currentRow.handler }}</el-col>
        <el-col :span="12">操作时间：{{ currentRow.handDate }}</el-col>
      </el-row>
      <el-table :data="currentRow.purchaseOrderDtoList">
        <el-table-column label="名称" prop="name" show-overflow-tooltip />
        <el-table-column label="类型" prop="materialMedicineType" show-overflow-tooltip />
        <el-table-column label="规格" prop="spec" show-overflow-tooltip />
        <el-table-column label="单位" prop="unit" show-overflow-tooltip />
        <el-table-column label="数量" prop="purchaseCount" show-overflow-tooltip />
        <el-table-column label="进货单价" prop="price" show-overflow-tooltip />
        <el-table-column label="批次号" prop="inventoryBatch" show-overflow-tooltip />
        <el-table-column label="生产日期" prop="productionDate" show-overflow-tooltip />
        <el-table-column label="保质期(月)" prop="expiredTime" show-overflow-tooltip />
        <el-table-column label="供货商" prop="inventorySupplier" show-overflow-tooltip />
      </el-table>
      <el-row style="margin-top:20px">
        <el-col style="text-align: right;">合计数量：{{ currentRow.totalNum }}</el-col>
      </el-row>
      <el-row style="margin-top:20px">
        <el-col>备注：{{ currentRow.remark }}</el-col>
      </el-row>
      <div class="all-margin-bottom" />
    </Dialog>
  </div>
</template>

<script>
// import { mapMutations } from 'vuex';
import Dialog from "@/components/Dialog";
export default {
  name: "Index",
  components: {
    Dialog,
  },
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    currentRow: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      loading: false,
    };
  },
  methods: {
    handleClose() {
      this.$emit('handleClose');
    },
  },
};
</script>

<style scoped lang='scss'>
  /deep/ .el-col{
    line-height: 30px;
  }
</style>
